
import React from 'react';
import Controller, { IFileItem } from "Controller";
import { Button } from "antd";

export default function GoIn(props: { record: IFileItem }) {
    
    const { record } = props;

    const onClick = React.useCallback(()=>{
        Controller.instance.run(async s => {
            s.project.location = [...s.project.location, record.name]
        })
    }, [record.name])

    return (
        <Button type="text" onClick={onClick} >进入</Button>
    )
}